package cn.hfjava.kz.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName templates
 */
@TableName(value ="templates")
@Data
public class Templates implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 模板名称
     */
    private String temname;

    /**
     * 模板类型
     */
    private String temtype = "";

    /**
     * 模板地址
     */
    private String temaddress = "";
    /**


    /**
     * 预览地址
     */
    private String temUrl = "";


    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createddate;

    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateddate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Templates other = (Templates) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTemname() == null ? other.getTemname() == null : this.getTemname().equals(other.getTemname()))
            && (this.getTemtype() == null ? other.getTemtype() == null : this.getTemtype().equals(other.getTemtype()))
            && (this.getTemaddress() == null ? other.getTemaddress() == null : this.getTemaddress().equals(other.getTemaddress()))
            && (this.getCreateddate() == null ? other.getCreateddate() == null : this.getCreateddate().equals(other.getCreateddate()))
            && (this.getUpdateddate() == null ? other.getUpdateddate() == null : this.getUpdateddate().equals(other.getUpdateddate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTemname() == null) ? 0 : getTemname().hashCode());
        result = prime * result + ((getTemtype() == null) ? 0 : getTemtype().hashCode());
        result = prime * result + ((getTemaddress() == null) ? 0 : getTemaddress().hashCode());
        result = prime * result + ((getCreateddate() == null) ? 0 : getCreateddate().hashCode());
        result = prime * result + ((getUpdateddate() == null) ? 0 : getUpdateddate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", temname=").append(temname);
        sb.append(", temtype=").append(temtype);
        sb.append(", temaddress=").append(temaddress);
        sb.append(", createddate=").append(createddate);
        sb.append(", updateddate=").append(updateddate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}